chore: add APM integration to CI#1148
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
|
Ok the APM tests are failing on CI. @jalvz could you take a look before merging this PR? |
jalvz
left a comment
There was a problem hiding this comment.
oh i didn't know new tests did not run on CI... do we need also the cloud tag?
No, because the |
|
/test |
|
@adam-stokes I'm currently working in this branch, as there are some outdated scenarios that need rework |
|
@jalvz sorry for taking that much in pushing this forward. I've just returned from vacations and would like to merge this ASAP. I've found one issue with the current implementation of the Do you know why? |
|
Updated the description and pinged @elastic/apm-server team so that they are aware of how to reproduce this failure for the APM integration. As mentioned on Slack, they are testing the Fleet integration on every APM Server's PR, so they pointed out to a possible problem in tests' setup. |
The installation of the integration to the policy is already tested in another scenario
We were getting the 1st agent, and because we have an agent bootstrapped as fleet-server, it was retrieved as the first one, causing that the "is agent 'online'" step always returned true, instead of returning the status of the newly deployed agent.
161ff54 to
c48752c
Compare
|
Thousand thank yous to @michalpristas and @axw for the quick chats we had to unblock this. |
* master: fix(ci): wait for downstream jobs on scheduled jobs (elastic#1393) Fix for the OS field and scenarios (elastic#1349) Add test case for add_kubernetes_metadata with autodiscover (elastic#1385) chore(ci): propagate downstream build result to upstream (elastic#1377)
| Scenario Outline: Starting the <image> agent starts backend processes | ||
| When a "<image>" stand-alone agent is deployed | ||
| Then there are "1" instances of the "filebeat" process in the "started" state | ||
| Then there are "2" instances of the "filebeat" process in the "started" state |
There was a problem hiding this comment.
This was an error hidden by the non-autoenrolling stand-alone agent.
* chore: add APM integration to CI * fix: update scenario step to latest version * chore: remove blank lines * fix: remove fleet server from the stand-alone agent * feat: add an scenario for adding integrations * chore: simplify scenarios avoiding testing twice The installation of the integration to the policy is already tested in another scenario * chore: rename scenario * chore: add integrations feature file to the CI * chore: remove references to FleetServerPolicy, as it's not used anymore * fix: bring fleet-server boostrap test back * fix: expose cloud agent in a not used port * chore: extract a method to get Fleet Server URL * fix: get stand-alone agent by hostname from agents list We were getting the 1st agent, and because we have an agent bootstrapped as fleet-server, it was retrieved as the first one, causing that the "is agent 'online'" step always returned true, instead of returning the status of the newly deployed agent. * fix: automatically enroll the stand-alone agent in Fleet * fix: reduce the number of occurrences * fix: there are 2 filebeat instances * chore: move cloud configs to a better place * chore: run APM tests with ubi8 base image * fix: keep original structure * fix: right volume path * chore: remove cloud scenario for APM integration (cherry picked from commit bc65335)
* chore: add APM integration to CI * fix: update scenario step to latest version * chore: remove blank lines * fix: remove fleet server from the stand-alone agent * feat: add an scenario for adding integrations * chore: simplify scenarios avoiding testing twice The installation of the integration to the policy is already tested in another scenario * chore: rename scenario * chore: add integrations feature file to the CI * chore: remove references to FleetServerPolicy, as it's not used anymore * fix: bring fleet-server boostrap test back * fix: expose cloud agent in a not used port * chore: extract a method to get Fleet Server URL * fix: get stand-alone agent by hostname from agents list We were getting the 1st agent, and because we have an agent bootstrapped as fleet-server, it was retrieved as the first one, causing that the "is agent 'online'" step always returned true, instead of returning the status of the newly deployed agent. * fix: automatically enroll the stand-alone agent in Fleet * fix: reduce the number of occurrences * fix: there are 2 filebeat instances * chore: move cloud configs to a better place * chore: run APM tests with ubi8 base image * fix: keep original structure * fix: right volume path * chore: remove cloud scenario for APM integration (cherry picked from commit bc65335)
* chore: add APM integration to CI * fix: update scenario step to latest version * chore: remove blank lines * fix: remove fleet server from the stand-alone agent * feat: add an scenario for adding integrations * chore: simplify scenarios avoiding testing twice The installation of the integration to the policy is already tested in another scenario * chore: rename scenario * chore: add integrations feature file to the CI * chore: remove references to FleetServerPolicy, as it's not used anymore * fix: bring fleet-server boostrap test back * fix: expose cloud agent in a not used port * chore: extract a method to get Fleet Server URL * fix: get stand-alone agent by hostname from agents list We were getting the 1st agent, and because we have an agent bootstrapped as fleet-server, it was retrieved as the first one, causing that the "is agent 'online'" step always returned true, instead of returning the status of the newly deployed agent. * fix: automatically enroll the stand-alone agent in Fleet * fix: reduce the number of occurrences * fix: there are 2 filebeat instances * chore: move cloud configs to a better place * chore: run APM tests with ubi8 base image * fix: keep original structure * fix: right volume path * chore: remove cloud scenario for APM integration (cherry picked from commit bc65335)
* chore: add APM integration to CI * fix: update scenario step to latest version * chore: remove blank lines * fix: remove fleet server from the stand-alone agent * feat: add an scenario for adding integrations * chore: simplify scenarios avoiding testing twice The installation of the integration to the policy is already tested in another scenario * chore: rename scenario * chore: add integrations feature file to the CI * chore: remove references to FleetServerPolicy, as it's not used anymore * fix: bring fleet-server boostrap test back * fix: expose cloud agent in a not used port * chore: extract a method to get Fleet Server URL * fix: get stand-alone agent by hostname from agents list We were getting the 1st agent, and because we have an agent bootstrapped as fleet-server, it was retrieved as the first one, causing that the "is agent 'online'" step always returned true, instead of returning the status of the newly deployed agent. * fix: automatically enroll the stand-alone agent in Fleet * fix: reduce the number of occurrences * fix: there are 2 filebeat instances * chore: move cloud configs to a better place * chore: run APM tests with ubi8 base image * fix: keep original structure * fix: right volume path * chore: remove cloud scenario for APM integration (cherry picked from commit bc65335) Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
* chore: add APM integration to CI * fix: update scenario step to latest version * chore: remove blank lines * fix: remove fleet server from the stand-alone agent * feat: add an scenario for adding integrations * chore: simplify scenarios avoiding testing twice The installation of the integration to the policy is already tested in another scenario * chore: rename scenario * chore: add integrations feature file to the CI * chore: remove references to FleetServerPolicy, as it's not used anymore * fix: bring fleet-server boostrap test back * fix: expose cloud agent in a not used port * chore: extract a method to get Fleet Server URL * fix: get stand-alone agent by hostname from agents list We were getting the 1st agent, and because we have an agent bootstrapped as fleet-server, it was retrieved as the first one, causing that the "is agent 'online'" step always returned true, instead of returning the status of the newly deployed agent. * fix: automatically enroll the stand-alone agent in Fleet * fix: reduce the number of occurrences * fix: there are 2 filebeat instances * chore: move cloud configs to a better place * chore: run APM tests with ubi8 base image * fix: keep original structure * fix: right volume path * chore: remove cloud scenario for APM integration (cherry picked from commit bc65335) Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
* chore: add APM integration to CI * fix: update scenario step to latest version * chore: remove blank lines * fix: remove fleet server from the stand-alone agent * feat: add an scenario for adding integrations * chore: simplify scenarios avoiding testing twice The installation of the integration to the policy is already tested in another scenario * chore: rename scenario * chore: add integrations feature file to the CI * chore: remove references to FleetServerPolicy, as it's not used anymore * fix: bring fleet-server boostrap test back * fix: expose cloud agent in a not used port * chore: extract a method to get Fleet Server URL * fix: get stand-alone agent by hostname from agents list We were getting the 1st agent, and because we have an agent bootstrapped as fleet-server, it was retrieved as the first one, causing that the "is agent 'online'" step always returned true, instead of returning the status of the newly deployed agent. * fix: automatically enroll the stand-alone agent in Fleet * fix: reduce the number of occurrences * fix: there are 2 filebeat instances * chore: move cloud configs to a better place * chore: run APM tests with ubi8 base image * fix: keep original structure * fix: right volume path * chore: remove cloud scenario for APM integration (cherry picked from commit bc65335) Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>

What does this PR do?
It adds a parallel execution running the tests for the APM Integration. Besides that, because this PR was outdated with the codebase, I'm doing the following tasks:
the stand-alone agent is listed in Fleet as "online"step was getting the online status for the wrong agent (the first agent in the list, which was the already bootstrapped fleet-server agent). For that reason we are getting the hostname of current agent and checking that it appears in the response of the agents list. If so, we verify that it's in the online status. The auto-enrollment has been implemented with ce45452, where the proper env vars have been declared and populated so the agent enrolls in Fleet using the already bootstrapped fleet-server.Why is it important?
We were not running those tests on CI
Checklist
make noticein the proper directory)Author's Checklist
How to test this PR locally
TAGS="apm_server && install" TIMEOUT_FACTOR=5 LOG_LEVEL=TRACE DEVELOPER_MODE=true ELASTIC_APM_ACTIVE=false make -C e2e/_suites/fleet functional-testRelated issues
Backports
Backport to 7.x, and check if 7.14.x and 7.13.x are required